Optimal. Leaf size=255 \[ -\frac{\cot (e+f x) \sqrt{\frac{b (1-\sec (e+f x))}{a+b}} \sqrt{-\frac{b (\sec (e+f x)+1)}{a-b}} \text{EllipticF}\left (\sin ^{-1}\left (\frac{\sqrt{a+b \sec (e+f x)}}{\sqrt{a+b}}\right ),\frac{a+b}{a-b}\right )}{f \sqrt{a+b}}+\frac{b^2 \tan (e+f x)}{f \left (a^2-b^2\right ) \sqrt{a+b \sec (e+f x)}}-\frac{\cot (e+f x)}{f \sqrt{a+b \sec (e+f x)}}+\frac{\cot (e+f x) \sqrt{\frac{b (1-\sec (e+f x))}{a+b}} \sqrt{-\frac{b (\sec (e+f x)+1)}{a-b}} E\left (\sin ^{-1}\left (\frac{\sqrt{a+b \sec (e+f x)}}{\sqrt{a+b}}\right )|\frac{a+b}{a-b}\right )}{f \sqrt{a+b}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.320415, antiderivative size = 255, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.261, Rules used = {3875, 3833, 21, 3829, 3832, 4004} \[ \frac{b^2 \tan (e+f x)}{f \left (a^2-b^2\right ) \sqrt{a+b \sec (e+f x)}}-\frac{\cot (e+f x)}{f \sqrt{a+b \sec (e+f x)}}-\frac{\cot (e+f x) \sqrt{\frac{b (1-\sec (e+f x))}{a+b}} \sqrt{-\frac{b (\sec (e+f x)+1)}{a-b}} F\left (\sin ^{-1}\left (\frac{\sqrt{a+b \sec (e+f x)}}{\sqrt{a+b}}\right )|\frac{a+b}{a-b}\right )}{f \sqrt{a+b}}+\frac{\cot (e+f x) \sqrt{\frac{b (1-\sec (e+f x))}{a+b}} \sqrt{-\frac{b (\sec (e+f x)+1)}{a-b}} E\left (\sin ^{-1}\left (\frac{\sqrt{a+b \sec (e+f x)}}{\sqrt{a+b}}\right )|\frac{a+b}{a-b}\right )}{f \sqrt{a+b}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3875
Rule 3833
Rule 21
Rule 3829
Rule 3832
Rule 4004
Rubi steps
\begin{align*} \int \frac{\csc ^2(e+f x)}{\sqrt{a+b \sec (e+f x)}} \, dx &=-\frac{\cot (e+f x)}{f \sqrt{a+b \sec (e+f x)}}-\frac{1}{2} b \int \frac{\sec (e+f x)}{(a+b \sec (e+f x))^{3/2}} \, dx\\ &=-\frac{\cot (e+f x)}{f \sqrt{a+b \sec (e+f x)}}+\frac{b^2 \tan (e+f x)}{\left (a^2-b^2\right ) f \sqrt{a+b \sec (e+f x)}}+\frac{b \int \frac{\sec (e+f x) \left (-\frac{a}{2}-\frac{1}{2} b \sec (e+f x)\right )}{\sqrt{a+b \sec (e+f x)}} \, dx}{a^2-b^2}\\ &=-\frac{\cot (e+f x)}{f \sqrt{a+b \sec (e+f x)}}+\frac{b^2 \tan (e+f x)}{\left (a^2-b^2\right ) f \sqrt{a+b \sec (e+f x)}}-\frac{b \int \sec (e+f x) \sqrt{a+b \sec (e+f x)} \, dx}{2 \left (a^2-b^2\right )}\\ &=-\frac{\cot (e+f x)}{f \sqrt{a+b \sec (e+f x)}}+\frac{b^2 \tan (e+f x)}{\left (a^2-b^2\right ) f \sqrt{a+b \sec (e+f x)}}-\frac{b \int \frac{\sec (e+f x)}{\sqrt{a+b \sec (e+f x)}} \, dx}{2 (a+b)}-\frac{b^2 \int \frac{\sec (e+f x) (1+\sec (e+f x))}{\sqrt{a+b \sec (e+f x)}} \, dx}{2 \left (a^2-b^2\right )}\\ &=\frac{\cot (e+f x) E\left (\sin ^{-1}\left (\frac{\sqrt{a+b \sec (e+f x)}}{\sqrt{a+b}}\right )|\frac{a+b}{a-b}\right ) \sqrt{\frac{b (1-\sec (e+f x))}{a+b}} \sqrt{-\frac{b (1+\sec (e+f x))}{a-b}}}{\sqrt{a+b} f}-\frac{\cot (e+f x) F\left (\sin ^{-1}\left (\frac{\sqrt{a+b \sec (e+f x)}}{\sqrt{a+b}}\right )|\frac{a+b}{a-b}\right ) \sqrt{\frac{b (1-\sec (e+f x))}{a+b}} \sqrt{-\frac{b (1+\sec (e+f x))}{a-b}}}{\sqrt{a+b} f}-\frac{\cot (e+f x)}{f \sqrt{a+b \sec (e+f x)}}+\frac{b^2 \tan (e+f x)}{\left (a^2-b^2\right ) f \sqrt{a+b \sec (e+f x)}}\\ \end{align*}
Mathematica [A] time = 7.60996, size = 259, normalized size = 1.02 \[ \frac{\sqrt{\sec (e+f x)} \left (\frac{b \left (-\frac{(a+b) \sqrt{\frac{a \cos (e+f x)+b}{(a+b) (\cos (e+f x)+1)}} \left (E\left (\sin ^{-1}\left (\tan \left (\frac{1}{2} (e+f x)\right )\right )|\frac{a-b}{a+b}\right )-\text{EllipticF}\left (\sin ^{-1}\left (\tan \left (\frac{1}{2} (e+f x)\right )\right ),\frac{a-b}{a+b}\right )\right )}{\sqrt{\frac{\cos (e+f x)}{\cos (e+f x)+1}}}-\tan \left (\frac{1}{2} (e+f x)\right ) (a \cos (e+f x)+b)\right )}{\left (b^2-a^2\right ) \sqrt{\sec ^2\left (\frac{1}{2} (e+f x)\right )} \sqrt{\cos ^2\left (\frac{1}{2} (e+f x)\right ) \sec (e+f x)}}+\frac{\csc (e+f x) (a \cos (e+f x)+b) (b \cos (e+f x)-a)}{\left (a^2-b^2\right ) \sqrt{\sec (e+f x)}}\right )}{f \sqrt{a+b \sec (e+f x)}} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.32, size = 852, normalized size = 3.3 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\csc \left (f x + e\right )^{2}}{\sqrt{b \sec \left (f x + e\right ) + a}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{\csc \left (f x + e\right )^{2}}{\sqrt{b \sec \left (f x + e\right ) + a}}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\csc ^{2}{\left (e + f x \right )}}{\sqrt{a + b \sec{\left (e + f x \right )}}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\csc \left (f x + e\right )^{2}}{\sqrt{b \sec \left (f x + e\right ) + a}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]